package Thread;

/**
 * 创建线程方式一：继承Thread类，重写run方法，调用start开启线程
 */
public class TestThread1 extends Thread{

    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println("我在看代码---"+i);
        }
    }

    public static void main(String[] args) {

        TestThread1 testThread1 = new TestThread1();
        testThread1.run();

        for (int i = 0; i < 1000; i++) {
            System.out.println("我在学习---"+i);
        }
    }
}
